package commands;

import IA.InformationAggregator;

/**
 *
 * @author Christopher
 */
public class CmdAddComment extends Command {
    private String comment; 
    public CmdAddComment(InformationAggregator IA, String Comment){
        super(IA);
        comment = Comment;
    }
    
    @Override
    public Object execute() {
        char delimiter = '/';
        int ch = delimiter;
        String name = comment.substring(0, comment.indexOf(ch));
        String description = comment.substring(comment.indexOf(ch)+1);
        ia.getCommentCollection().addComment(name, description);
        return null;
    }
}
